class Pet:
    def __init__(self, name):
        self.name = name


class Dog(Pet):
    def __init__(self, name, color):
        super().__init__(name)
        self.color = color

    def work(self):
        print(self.name+"会看家")


dog = Dog('小黑', '黑色')
print(dog.name)
print(dog.color)
dog.work()
